home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk14 / c64em / commands.c < prev    next >
C/C++ Source or Header  |  1995-03-18  |  4KB  |  188 lines

  1. /*
  2.  *        Commodore 64 Spoof Emulator (C) Eddy Carroll, 1st April 1988
  3.  *
  4.  * Module: COMMANDS.C
  5.  *
  6.  * Contains definitions for the commands, error messages, and standard
  7.  * prompts used in the emulator. To change the messages, only this module
  8.  * need be recompiled.
  9.  *
  10.  */
  11.  
  12. #include <exec/types.h>
  13. #include "commands.h"
  14.  
  15. /* 
  16.  * List of commands and standard responses. Each record stores a command
  17.  * name, it's length, and a "response" message for that command.
  18.  * Note: The first entry corresponds to a line number being entered.
  19.  *
  20.  */
  21.  
  22. struct commandlist command[] = {
  23.  
  24. {NULL,        4, 0,
  25. {"Hmmm...a would-be programmer, eh?\r",
  26.  "In fact, this emulator doesn't\ractually emulate PROGRAMS.\r",
  27.  NULL
  28. }},
  29. {"GO AMIGA",4,0,
  30. {"Ah - very good! If you can have GO 64\ron a C128, why not GO AMIGA",
  31. "Nah...that won't work",
  32. NULL
  33. }},
  34. {"LIST",    4, 0,
  35. {"3 Bags Flour\r6 Doz Eggs\r1 Loaf Bread\r",
  36.  "1 3.5\42 Disk Drive\r1 Colour Monitor\r1 Amiga 500\r",
  37.  NULL
  38. }},
  39. {"LOAD\42$\42",    7,    0,
  40. {"You want a directory? Try a phone\rbook instead.\r",
  41. "Sorry - I don't feel up to disk access\rjust at the moment. In fact, \
  42. I'm feelingrather depressed if you must know.\rBrain the size of a \
  43. planet, and what\rdo people do - try and get a\rDIRECTORY. I don't know \
  44. what the\rworld is coming too...\r",
  45. "Look, if you try that ONCE more I'll\rbe very cross\r"
  46. }},
  47. {"LOAD",    4, 0,
  48. {"Erm...I'm afraid that this emulation\rdoesn't emulate the LOAD command.\r",
  49.  "And just how do you expect me to\raccomplish that on an Amiga?\r",
  50. "Ok, I'LL load a program when YOU show\rme where you've plugged in the 1541\r"
  51. }},
  52. {"RUN",        3, 0,
  53. {"Oh God, not another one of these\rkeep-fit addicts.\r",
  54. "Can't - my ankle's twisted!\r",
  55.  NULL
  56. }},
  57. {"SAVE",    4, 0,
  58. {"Yes! Yes! Yes! With the E.B.S.\r",
  59. "Only Jesus can do that.\r",
  60. NULL
  61. }},
  62. {"CLOSE",    5, 0,
  63. {"Hmm ... another Public holiday?\r",
  64. "Shut up, yourself!\r",
  65. NULL
  66. }},
  67. {"CLR",        3, 0,
  68. {"... as clear as mud, I reckon.\r",
  69. "Okay, I'm thinking clearly now.\rEverything makes perfect sense\r\
  70. Daisy, where are you now?\r",
  71. "Pardon?\r"
  72. }},
  73. {"CONT",    4, 0,
  74. {"Won't continue error\r",
  75. "Same to you with knobs on!\r",
  76. NULL
  77. }},
  78. {"DATA",    4, 0,
  79. {"Blind data error.\r",
  80. "You like Police records, then?\r",
  81. NULL
  82. }},
  83. {"DIM",        3, 0,
  84. {"I am not!\r",
  85. "It's dark enough, thanks.\r",
  86. "Okay, put on the specs, it's in\r3-d from now on.\r"
  87. }},
  88. {"END",        3, 0,
  89. {".. of the universe ?\r",
  90. "Okay, I'm finished working.\r",
  91. NULL
  92. }},
  93. {"GET",        3, 0,
  94. {"I'm not getting anymore messages\rfor you.\r",
  95. "I got that yesterday!\r",
  96. "I never get that kind of joke.\r"
  97. }},
  98. {"GOSUB",    5, 0,
  99. {"Into submarines, are we?\r",
  100. "Okay, but I won't return.\r",
  101. "No! Use procedures.\r"
  102. }},
  103. {"GO",        2, 0,
  104. {"I'm fed up going here, going there\rand never a word of thanks.\r",
  105. "Now where?\r",
  106. "I've already been there - it's very\rboring.\r"
  107. }},
  108. {"IF",        2, 0,
  109. {"No 'ifs', be sure!\r",
  110. "If I were a rich man...\r",
  111. NULL
  112. }},
  113. {"INPUT",    5, 0,
  114. {"Ask whatever you want, I'm not\rtelling.\r",
  115. "You'll have to ask someone else.\r",
  116. NULL
  117. }},
  118. {"LET",        3, 0,
  119. {"Let bygones be bygones.\r",
  120. "Let it be.\r",
  121. "This computer is not to let.\r"
  122. }},
  123. {"NEW",        4, 0,
  124. {"Okay, I'm brand new.\r",
  125. "No news today .. sorry!\r",
  126. NULL
  127. }},
  128. {"STOP",    4, 0,
  129. {"Arrggghhh .. can't stop now.\r",
  130. "Sccrreeeeech ....\r",
  131. "Bl@@dy lollipop person!\r"
  132. }}
  133.  
  134.  
  135.  
  136.  
  137. };
  138.  
  139. int MAXCOMMANDS = 19;
  140.  
  141. /*
  142.  * Now come the error messages, these are printed out whenever the
  143.  * emulator is given a command it doesn't recognise.
  144.  *
  145.  */
  146.  
  147. char *errormsg[] = {
  148.  
  149. "?Too many fingers on keyboard error\r",
  150. "?String too tangled error\r",
  151. "?Formula too boring error\r",
  152. "?Novice programmer error\r",
  153. "?Computer too busy error\r",
  154. "?Atari Owner in vicinity error\r",
  155. "?Command too trivial error\r",
  156. "?Hardware malfunction error\r",
  157. "?No silver lining on cloud error\r",
  158. "?Year not a leap year error\r",
  159. "?Hyper-space misdirection error\r",
  160. "?Memory empty error\r",
  161. "?No bits to bite error\r",
  162. "?Commodore 64 incompatibility error\r",
  163. "?Invalid lexical indicator error\r",
  164. "?4th dimensional error\r",
  165. "?Nth dimensional error\r",
  166. "?Out of this world error\r",
  167. "?Too many users on system error\r",
  168. "?Too many characters on screen error\r",
  169. };
  170.  
  171. int MAXERRORS = 20;
  172.  
  173. /*
  174.  * Now come a few standard messages.
  175.  *
  176.  */
  177.  
  178. char *STARTUP =
  179. "\r    **** Commodore 64 Basic V2 ****\r\r\
  180.  64K Ram System  38911 Basic Bytes Free\r\r";
  181.  
  182. char *ABOUT =
  183. "\r     *** Commodore 64 Emulator ***\r\r\
  184.     (C) Eddy Carroll 1st April 1988\r\r";
  185.  
  186. char *READY =
  187. "Ready.\r";
  188.